<?php
session_unset();
srand(); $geist1=""; for($i=0;$i<80;++$i){ $geist1.=dechex(rand(0,15)); }
$_SESSION['geist1']=$geist1;
?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head>
<style type="text/css" media="all">
body{ margin:0 auto; width: 23em; background-color:#010101; color:#e11; font: bold 72% "Helvetica";}
input:focus{ background: #def; }
</style>
</head><body>
<form name="geist" action="#" method="post" style="background-color:#eee; margin:8px; padding:8px; text-align:center;">
Username<input type="text" name="geistu" value="admin"/>
Password:<input type="password" name="geistp" value="nimda"/>
<textarea name="geiste" rows="9" cols="26">Please enter your user name and password and click on the triangle</textarea>
<img id="geistx" src="../res/sitegeist.png" alt="sitegeist" name="geistx" onclick="login();" style="cursor:pointer;"/>
<input type="hidden" name="geist1" value="<?php echo $geist1; ?>"/>
</form>
<form name="tsiegn1da" action="#" method="post">
<input type="hidden" name="geistu"/>
<input type="hidden" name="geist2"/>
<input type="hidden" name="url" value="<?php echo$geist ?>"/>
</form>
<script type="text/javascript">//<![CDATA[
var login=function(){
var u=document.geist.geistu;
if(document.geist.geistp.value==""){ document.geist.geistp.select(); if(u.value=="")u.select(); }
else if(u.value=="")u.select();
else{
  if (window.XMLHttpRequest){ var x=new XMLHttpRequest(); }
  else{ var x=new ActiveXObject("Microsoft.XMLHTTP"); }
  x.onreadystatechange=function(){ if(x.readyState==4 && x.status==200){
    document.tsiegn1da.geistu.value=document.geist.geistu.value;
    document.tsiegn1da.geist2.value=x.responseText
    document.tsiegn1da.action='<?php echo str_replace("\\","/",substr(dirname(__FILE__),strlen($_SERVER['DOCUMENT_ROOT']))) ?>/tau.php';
    document.tsiegn1da.submit();
  }}
  x.open("GET",'<?php echo str_replace("\\","/",substr(dirname(__FILE__),strlen($_SERVER['DOCUMENT_ROOT']))) ?>/fetch.php?q='+    document.geist.geist1.value+document.geist.geistp.value,true); x.send(); }
}
//]]></script>
</body></html>